<!DOCTYPE html>
<!--
 ! Excerpted from "Reactive Programming with RxJS",
 ! published by The Pragmatic Bookshelf.
 ! Copyrights apply to this code. It may not be used to create training material,
 ! courses, books, articles, and the like. Contact us if you are in doubt.
 ! We make no guarantees that this code is fit for any purpose.
 ! Visit http://www.pragmaticprogrammer.com/titles/smreactjs for more book information.
-->
<html>
  <head>
    <style>
      body {
        font-family: Tahoma, Geneva, sans-serif;
      }

      div {
        display: inline;
      }
    </style>
    <script>
      var host = window.document.location.host.replace(/:.*/, '');
      var ws = new WebSocket('ws://127.0.0.1:8080');

      ws.onmessage = function (event) {
        document.write(event.data);
        ws.send('clientMSG');
      };
    </script>
  </head>
  <body>
  </body>
</html>

